Fix ImportError on Python 3