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

Change-Id: I16333fc65f2539f6cc6f0116b2b0478cd9966636
2 files changed