Starbucks incurs a quarterly loss, but it came out better than expectations