Rays agree to deal with former Mets standout