cmake: Fix version get from git

Change-Id: I751803b38078275a336c2d93f584c528c25b3a6e