patch configure to correctly find libxml2

Modify configure check so it correctly detects libxml2.
So we use this when cross-compiling and when there's no command to tell us the XML2 config, where previously we didn't use it when cross-compiling.
Sounds sensible, supposing cross-compile builds set with_libxml2 to somewhere with the bits the cross-compilation needs.