Marlins beat Beckett and Red Sox, 4-1