fix internal imports for python 3 support