Implements BSD build support

Also:

* Restores Ubuntu 12.04 LTS build support.

* Restores clang 3.3. build support.

* Patches internal googletest to support BSD.