Mets edge Cardinals 9-8 with ninth-inning homer off Rosenthal