Add the git commit (if applicable) to LyX version

Addition to cmake.
Patch mostly from Stephan Witt.