D-backs strike early in 5-4 win over Giants