Work around missing ElementTree.ParseError on older python versions