Fixed compiling of gtest and pass gtest in CI.