CMakeLists.txt: Make the git hash be a valid tag if building out-of-tree

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iiod: Ensure that we always send 7 chars for the GIT tag

If libiio is built from a tarball instead of from the GIT tree, the GIT
tag will correspond to a tag, e.g. "v0.2". This commit ensures that we
still send 7 characters, as expected by the network backend of libiio.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>