added mingw32 compat stuff