Fix compatibility with Mercurial 3.2

This fixes issue #27.