Gold settles higher after string of weekly declines