gold ends lower, holds ground at a 5-week low