Python2.7.3+ThreadLocal hack