make the build script more compatible with Python 3