McLouth home run helps Pirates beat Red Sox 6-5