gold ends 0.3% higher at $1,235.40 an ounce