Make lxml.doctestcompare consistent with stdlib's doctest

Fixes https://bugs.launchpad.net/lxml/+bug/1238503