Modified Mac build fix for new binding.gyp structure
diff --git a/binding.gyp b/binding.gyp
index 4c6a641..9b1dc7a 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -73,16 +73,6 @@
          ]
         ]
       }],
-      ['OS=="mac"', {
-        'xcode_settings': {
-          'MACOSX_DEPLOYMENT_TARGET': '10.9',
-          'OTHER_CFLAGS': [
-            '-fno-strict-aliasing',
-            '-std=c++11',
-            '-stdlib=libc++'
-          ]
-        }
-      }]
     ]
   },
   'targets': [
@@ -134,6 +124,16 @@
         'src/core/support/time_win32.c',
         'src/core/support/tls_pthread.c',
       ],
+      "conditions": [
+        ['OS == "mac"', {
+          'xcode_settings': {
+            'MACOSX_DEPLOYMENT_TARGET': '10.9',
+            'OTHER_CFLAGS': [
+              '-stdlib=libc++'
+            ]
+          }
+        }]
+      ],
     },
     {
       'target_name': 'grpc',
@@ -292,6 +292,16 @@
         'src/core/census/operation.c',
         'src/core/census/tracing.c',
       ],
+      "conditions": [
+        ['OS == "mac"', {
+          'xcode_settings': {
+            'MACOSX_DEPLOYMENT_TARGET': '10.9',
+            'OTHER_CFLAGS': [
+              '-stdlib=libc++'
+            ]
+          }
+        }]
+      ],
     },
     {
       'include_dirs': [
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 982a9ae..2be275b 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -75,16 +75,6 @@
            ]
           ]
         }],
-        ['OS=="mac"', {
-          'xcode_settings': {
-            'MACOSX_DEPLOYMENT_TARGET': '10.9',
-            'OTHER_CFLAGS': [
-              '-fno-strict-aliasing',
-              '-std=c++11',
-              '-stdlib=libc++'
-            ]
-          }
-        }]
       ]
     },
     'targets': [
@@ -104,6 +94,16 @@
           '${source}',
           % endfor
         ],
+        "conditions": [
+          ['OS == "mac"', {
+            'xcode_settings': {
+              'MACOSX_DEPLOYMENT_TARGET': '10.9',
+              'OTHER_CFLAGS': [
+                '-stdlib=libc++'
+              ]
+            }
+          }]
+        ],
       },
       % endif
       % endfor