Make tools/build/gen-version.pl work correctly in git submodules.