Fixed link error when cross-compiling with mingw.