mingw cross-compile patch by Pablo D'Angelo