South Carolina judge upholds activist’s 4-year prison term