Make the reference checkout work also on git 1.7.X.