fix compilation issue when cross-compiling with mingw (thanks to Thorsten)