use _setmode instead of _set_fmode in windows

now compiles with MinGW-w64