Make `except` syntax compatible with Python 3. Requires Python 2.6+