Rays agree to sign former Gold Glove infielder