Fix xml reporter for Python 3.x