stop using thread_local because VS2013 is dumb