Fix git versioning in CMake

Use proper test of git describe