Gold settles at a 5-month high as investors focus on geopolitics