Make configure.py work with Python. Fixes issue #877.