Leon homers to end Boston's 3-0, 12-inning win over Pirates