Eagles hang on, beat Cardinals, 24-21