extract version info from git

fixes #1806