Fix a compilation error with MSVC 2005 due to use of mode_t MSVC apparently doesn't have a mode_t defined, though mingw does. Found by Savg He.