Fix build for newer version of python and gcc