gold settles higher, but rings up first weekly loss in a month