gold prices end lower, but tally a second straight monthly gain