using pthreads-win32 instead of win32 thread api.