This was previously limited to Linux predicated on the existence of certain headers, but Rust just exposes those functions unconditionally. So remove the check and just perform the mtime hack on Linux and Android.
Rust libc supports O_EXLOCK on supported platforms (BSD/macOS), use that instead of re-exposing it.
Fixes #10214