gold settles higher on safe-haven buying