Office Depot swings to loss in Q3, but results beat Street