Add preprocessor conditionals for WIN32/WIN64 to define POSIX-compatible
file mode macros (S_IRUSR, S_IWUSR), O_SYNC flag, and S_ISREG/S_ISDIR
macros using Windows equivalents. Also fix a minor typo in the comment
describing the file flag mapping approach.