Fix Linux build

Change-Id: I7efa0cda398864afa1376293dfe378a94ac87005
diff --git a/kokoro/build.py b/kokoro/build.py
index f0091eb..ef09f96 100755
--- a/kokoro/build.py
+++ b/kokoro/build.py
@@ -41,6 +41,7 @@
         '--prefix={}'.format(install_dir),
         '--enable-shared',
     ]
+    env = dict(os.environ)
     if host == Host.Darwin:
         config_cmd.append('--enable-universalsdk')
         config_cmd.append('--with-universal-archs=universal2')
@@ -48,6 +49,7 @@
         MAC_MIN_VERSION = '10.9'
         cflags.append('-mmacosx-version-min={}'.format(MAC_MIN_VERSION))
         cflags.append('-DMACOSX_DEPLOYMENT_TARGET={}'.format(MAC_MIN_VERSION))
+        env['MACOSX_DEPLOYMENT_TARGET'] = MAC_MIN_VERSION
         ldflags.append("-Wl,-rpath,'@loader_path/../lib'")
 
         # Disable functions to support old macOS. See https://bugs.python.org/issue31359
@@ -67,11 +69,9 @@
     elif host == Host.Linux:
         ldflags.append("-Wl,-rpath,'$$ORIGIN/../lib'")
 
-    env = dict(os.environ)
     env.update({
         'CC': ' '.join(['cc'] + cflags + ldflags),
         'CXX': ' '.join(['c++'] + cflags + ldflags),
-        'MACOSX_DEPLOYMENT_TARGET': MAC_MIN_VERSION,
     })
 
     subprocess.check_call(config_cmd, cwd=build_dir, env=env)