fixed cmake errors with git versions #869