Disable stack mprotects when running on valgrind

Bug: 18155388
Change-Id: I17d7e3c707e83b864b0394ebbfb2438021faf76f
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index bcfb2fe..d6cafcc 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -760,7 +760,7 @@
     case kArm64:
     case kX86_64:
       implicit_null_checks_ = true;
-      implicit_so_checks_ = true;
+      implicit_so_checks_ = (RUNNING_ON_VALGRIND == 0);
       break;
     default:
       // Keep the defaults.