gold futures gain amid weakness in the dollar