Go defines S_IFMT on windows, plan9 and js/wasm as 0x1f000 instead of
0xf000. None of the the other S_IFxyz values (even on those mentioned)
include the "1" (in 0x1f000) which prevents them from matching the
bitmask.
This fixes that by overriding the S_IFMT value on the effected platforms
to be 0xf000, as it it on all others.