gold ends modestly higher on safe-haven buying