Jedd Gyorko homers, Tommy Pham doubles in Cardinals' win