McDonald's HR helps D-backs beat Greinke, Brewers