New attempt at fixing #582: linker error in windows mingw