Work around missing normalizeDocument in different xmldom versions