Gold settles modestly higher as stocks stage retreat