Posey homers in Giants 6-4 win over Brewers