static link pthreads for mingw builds