Cabrera hits 2 homers in Giants' 8-4 win