Cardinals rally for 5-4 win over Cubs