Goldschmidt hits two-run triple in D-backs' win