diff --git a/setup.py b/setup.py
index 4f3b46f00..700c1ecc7 100644
--- a/setup.py
+++ b/setup.py
@@ -190,11 +190,11 @@ def get_ext_modules():
     # Set various flags for use in TBB and openmp. On OSX, also find OpenMP!
     have_openmp = True
     if sys.platform.startswith('win'):
-        cpp11flags = []
+        cpp11flags = ['-D__TBB_LEGACY_MODE=1']
         ompcompileflags = ['-openmp']
         omplinkflags = []
     elif sys.platform.startswith('darwin'):
-        cpp11flags = ['-std=c++11']
+        cpp11flags = ['-std=c++11', '-D__TBB_LEGACY_MODE=1']
         # This is a bit unusual but necessary...
         # llvm (clang) OpenMP is used for headers etc at compile time
         # Intel OpenMP (libiomp5) provides the link library.
@@ -206,7 +206,7 @@ def get_ext_modules():
         omppath = ['lib', 'clang', '*', 'include', 'omp.h']
         have_openmp = check_file_at_path(omppath)
     else:
-        cpp11flags = ['-std=c++11']
+        cpp11flags = ['-std=c++11', '-D__TBB_LEGACY_MODE=1']
         ompcompileflags = ['-fopenmp']
         if platform.machine() == 'ppc64le':
             omplinkflags = ['-fopenmp']
