Fix error where dummy _thread module was imported in python 2.7