The Pantry posts loss in Q2