remote-hg: fix for older versions of python