XPO Reports 2Q Loss, Buys Ontario Logistics Firm