Red Sox rally with 4 in 8th inning, beat Tigers 7-5