Fix build for Python3