Make doctest Python 3.x compatible