Allow usage of a shared gtest library

I am no cmake guru; comments welcome :-)
This is inspired from the CLANG_LIBRARY code in [vm/generator/main/CMakeLists.txt](https://github.com/mozart/mozart2/blob/master/vm/generator/main/CMakeLists.txt#L10) but I removed the "NO_DEFAULT_PATH" tag.