South Carolina beats State with late homer