shiny/driver: use __MAC_OS_X_VERSION_MAX_ALLOWED for conditional compilation

__MAC_OS_X_VERSION_MAX_ALLOWED is official way to do conditional compilation
according to documentation in: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW5

Fixes golang/go#22634

Change-Id: I916403149ed6a1ede5d8dcb554d152784c302fcb
Reviewed-on: https://go-review.googlesource.com/31546
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/shiny/driver/gldriver/cocoa.m b/shiny/driver/gldriver/cocoa.m
index 1e96e3f..d8bfb8c 100644
--- a/shiny/driver/gldriver/cocoa.m
+++ b/shiny/driver/gldriver/cocoa.m
@@ -14,17 +14,16 @@
 #import <Foundation/Foundation.h>
 #import <OpenGL/gl3.h>
 
-#define IS_MAC_SIERRA_OR_LATER (NSAppKitVersionNumber - NSAppKitVersionNumber10_11)
-
 // The variables did not exist on older OS X releases,
 // we use the old variables deprecated on macOS to define them.
-#if !IS_MAC_SIERRA_OR_LATER
+#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
 enum
 {
     NSEventTypeScrollWheel = NSScrollWheel,
     NSEventTypeKeyDown = NSKeyDown
 };
-enum {
+enum
+{
     NSWindowStyleMaskTitled = NSTitledWindowMask,
     NSWindowStyleMaskResizable = NSResizableWindowMask,
     NSWindowStyleMaskMiniaturizable = NSMiniaturizableWindowMask,