Add gtests

This adds support for gtest-based tests for Mac and Linux