Fix mac build.

Test: Builds on mac/linux.
Test: Ran unit tests on mac/linux.
Change-Id: Ie89c2d8ac52a4df42e63ae0968f672482d2730f6
diff --git a/Isolate.cpp b/Isolate.cpp
index 1c2b73e..3eb63ac 100644
--- a/Isolate.cpp
+++ b/Isolate.cpp
@@ -48,7 +48,7 @@
 }
 
 static void RegisterSignalHandler() {
-  sighandler_t ret = signal(SIGINT, SignalHandler);
+  auto ret = signal(SIGINT, SignalHandler);
   if (ret == SIG_ERR) {
     PLOG(FATAL) << "Setting up SIGINT handler failed";
   }
@@ -59,7 +59,7 @@
 }
 
 static void UnregisterSignalHandler() {
-  sighandler_t ret = signal(SIGINT, SIG_DFL);
+  auto ret = signal(SIGINT, SIG_DFL);
   if (ret == SIG_ERR) {
     PLOG(FATAL) << "Disabling SIGINT handler failed";
   }
@@ -89,7 +89,11 @@
     command += " --gtest_filter=" + options_.filter();
   }
   command += " --gtest_list_tests";
+#if defined(__APPLE__)
+  FILE* fp = popen(command.c_str(), "r");
+#else
   FILE* fp = popen(command.c_str(), "re");
+#endif
   if (fp == nullptr) {
     PLOG(FATAL) << "Unexpected failure from popen";
   }