Adapt doctest output checker for Python 3.