Kosmos Energy swings to loss despite higher revenues