remote-hg: fix compatibility with older versions of hg