Fix build for Python versions other than 2.7