Handle SystemExit exception on Python 2.4