Darwin libc is quite incontinent, so use filter_xml_leak
in a few places rather than filter_xml.
Also old Darwin 17.7 sed doesn't understand "+1d" to delete the
matched line and the next line. So use N to join, s to delete the
newline and another match with d to delete the joined linbes.