Updated to use newer mingw32 conventions