remove dependency on libwinpthread-1.dll for the newer MinGW-w64 builds

Newer versions of MinGW-w64 introduce a dependency on it for threads
support, which is removed by passing the -static flag to the linker
and fixes #1723