gold prices end higher as the u.s. dollar loses more ground