(Mingw) Make threadutil.cpp mingw-compatible