Minor changes to allow compilation under windows (mingw)