fix for static builds with mingw-w64 compilers

Fix for issue #132