gold closes lower as dollar rises