gold ends lower as dollar strengthens