Make the _speedups extension compatible with Python 3.