fix imp deprecated bug in py3