Fix mingw cross-compile build