Improve support for old versions of git