OfficeMax swings to profit in Q2