U.S. companies added 172,000 jobs last month, according to a private survey, a sign that hiring may have recovered after a slowdown in April and May.