Macy’s and J.C. Penney beat expectations in June