configure: test -std=c++11 before enabling unit tests

since:
77fa51003 Replace deprecated scoped_ptr with unique_ptr

the unit tests require a c++11 capable compiler; future versions of
googletest (1.9.x) will as well, so this change was inevitable if we
wanted to keep the snapshot up to date.

Change-Id: Id5c646bd10fae09e7b705b7d5fad1344f2216282
diff --git a/configure b/configure
index e0ffb55..cd9cbbc 100755
--- a/configure
+++ b/configure
@@ -730,18 +730,15 @@
             # Some mingw toolchains don't have pthread available by default.
             # Treat these more like visual studio where threading in gtest
             # would be disabled for the same reason.
-            check_cxx "$@" <<EOF && soft_enable unit_tests
-int z;
-EOF
-            check_add_cxxflags -std=c++11 && soft_enable webm_io
+            check_add_cxxflags -std=c++11 && soft_enable unit_tests \
+              && soft_enable webm_io
             check_cxx "$@" <<EOF && soft_enable libyuv
 int z;
 EOF
         ;;
         *)
-            enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
-int z;
-EOF
+            enabled pthread_h && check_add_cxxflags -std=c++11 \
+              && soft_enable unit_tests
             check_add_cxxflags -std=c++11 && soft_enable webm_io
             check_cxx "$@" <<EOF && soft_enable libyuv
 int z;