Merge 3080 into branch 28. Hopefully this fixes our release.
diff --git a/src/build/common.gypi b/src/build/common.gypi
index 83ccc79..3a49ffd 100644
--- a/src/build/common.gypi
+++ b/src/build/common.gypi
@@ -106,14 +106,27 @@
           # We'd like to add '-Wtype-limits', but this does not work on
           # earlier versions of g++ on supported operating systems.
         ],
-        # Newer Chromium build adds -Wsign-compare which we have some difficulty
-        # with. Remove it for now.
         'cflags_cc!': [
-          '-Wsign-compare'
+          # Newer Chromium build adds -Wsign-compare which we have some
+          # difficulty with. Remove it for now.
+          '-Wsign-compare',
+          '-fno-rtti',  # Same reason as using -frtti below.
         ],
         'cflags_cc': [
           '-frtti',  # Hardy's g++ 4.2 <trl/function> uses typeid
         ],
+        'defines!': [
+          # testing/gtest.gyp defines GTEST_HAS_RTTI=0 for itself and all deps.
+          # This breaks when we turn rtti on, so must be removed.
+          'GTEST_HAS_RTTI=0',
+          # third_party/protobuf/protobuf.gyp defines GOOGLE_PROTOBUF_NO_RTTI
+          # for itself and all deps. I assume this is just a ticking time bomb
+          # like GTEST_HAS_RTTI=0 was, so remove it as well.
+          'GOOGLE_PROTOBUF_NO_RTTI',
+        ],
+        'defines': [
+          'GTEST_HAS_RTTI=1',  # gtest requires this set to indicate RTTI on.
+        ],
         # Disable -z,defs in linker.
         # This causes mod_pagespeed.so to fail because it doesn't link apache
         # libraries.
diff --git a/src/install/apache_https_fetch_test.sh b/src/install/apache_https_fetch_test.sh
index 88f4007..3932f76 100755
--- a/src/install/apache_https_fetch_test.sh
+++ b/src/install/apache_https_fetch_test.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Tests that mod_pagespeed can fetch HTTPS resources.  Note that mod_pagespeed
 # does not work like this by default: a flag must be specified in
@@ -9,7 +9,7 @@
 echo Note that this test will fail with timeouts if the serf fetcher has not
 echo been compiled in.
 
-this_dir="$( dirname "${BASH_SOURCE[0]}" )"
+this_dir="$(dirname $(readlink -f $0))"
 source "$this_dir/system_test_helpers.sh" || exit 1
 
 echo Test that we can rewrite an HTTPS resource from a domain with a valid cert.