fix some compile error for mingw mac