Gold settles higher to end streak of losses