Updated to deal with newer versions of mingw32