Gold ends at 2-month high as North Korea tension lifts haven assets