Fixes https://bugs.llvm.org/show_bug.cgi?id=34922.
Apparently, the mode in fdopen gets simply ignored and Windows only cares about the mode of the original open.
I have verified this both with the simple case from bug 34922 and with a full Firefox build.