fix linking for modules

fix win32 compilation with mingw