RIM earnings: A loss, but not as bad as expected