Fix for missing xml-parse-region function

Looks like the xml-parse-fragment function was removed from xml.el and
this fails in the latest versions of emacs24. Add a check to see if
the function is defined and use xml-parse-region otherwise for now.