Fix Windows build.

Windows will see that `S_IREAD` & `S_IWRITE` aren't defined and try to
access `S_IRUSR` & `S_IWUSR` which don't exist on Windows.