Marlins rally to beat Rays for first time in 3 years with 12-7 win