compat: make enforcesinglehead() compatible with hg <= 5.1 again

aa905c52ede5 removed the default value for accountclosed that was providing
compatibility for older versions of Mercurial.

--HG--
branch : stable
8 jobs for topic/stable/enforcesinglehead-5.1 in 11 minutes and 1 second (queued for 1 second)
Status Name Job ID Coverage
  Test
passed checks-py2 #159050

00:02:27

passed checks-py3 #159051

00:02:21

passed doc #159056

00:01:35

manual pytype #159049
allowed to fail manual
passed tests-py2-cext #159052

00:08:06

passed tests-py2-pure #159053

00:06:15

passed tests-py3-cext #159054

00:10:43

passed tests-py3-pure #159055

00:03:49