More changes to allow comptability with ancient Python versions.

Fixes #1