Fix Chrome OS unit tests

This change disables the test_tmpfs_userns test
in Chrome OS too, because it cannot be run in a
chroot environment.

Bug: None
Test: cros_workon_make --board=${BOARD} --test
Change-Id: Ie0f27110b3346e36c9d758a749753e46b6ad540f
diff --git a/Makefile b/Makefile
index 24e7836..2982aac 100644
--- a/Makefile
+++ b/Makefile
@@ -31,18 +31,22 @@
 CPPFLAGS += -DUSE_EXIT_ON_DIE
 endif
 
+# Setting this flag will run more unit tests that need a certain well-known
+# environment to run successfully.
+ifeq ($(USE_RUN_USER_NAMESPACE_TESTS),yes)
+CPPFLAGS += -DRUN_USER_NAMESPACE_TESTS
+endif
+
 CFLAGS += -Wextra -Wno-missing-field-initializers
 CXXFLAGS += -Wextra -Wno-missing-field-initializers
 
 USE_SYSTEM_GTEST ?= no
 ifeq ($(USE_SYSTEM_GTEST),no)
 GTEST_CXXFLAGS := -std=gnu++11
-GTEST_MAIN := gtest_main.a
 GTEST_LIBS := gtest.a
 else
-GTEST_CXXFLAGS := $(gtest-config --cxxflags)
-GTEST_MAIN := -lgtest -lgtest_main
-GTEST_LIBS := $(gtest-config --libs)
+GTEST_CXXFLAGS := $(shell gtest-config --cxxflags)
+GTEST_LIBS := $(shell gtest-config --libs)
 endif
 
 CORE_OBJECT_FILES := libminijail.o syscall_filter.o signal_handler.o \