Work around old git versions (symbolic-ref).