Acquisitions helped to drive second-quarter growth for Hanesbrands, as the apparel maker posted sales and earnings growth in line with company guidance.