gold ends modestly higher, silver recoups losses