applied Paul Murrell's patch for XMLTree.c
works for libxml2-2.9.1