Change if tests from macos to APPLE for consistency (Posix will follow).