Best Buy swings to loss in Q3