Fix build on Python 3