Marlins beat Astros 5-3 in 12 innings