U.S. worker productivity rose more than expected in the second quarter amid an increase in hours, but the trend remained weak,