[macos] Fix warnings around syscall deprecation on OS X 10.12 and up

The prior attempt to land this patch was incorrect. The OS X version
comparison is written as #if X >= Y, and on Linux, neither X nor Y are
defined. This results in both expanding to 0 in this context, and the
comparison being true. This is inadvertent.

Now, explicitly gate this path first on OS_MACOSX being defined.

Change-Id: Ia4e68f3785a64fecf035102e4285c2b015e050a1
2 files changed