Frandsen's HR in 9th lifts Phillies over Mets, 8-7