gold ends slightly higher as dollar falls vs. euro