Support BaseX embedded mode (Thanks @cfoster)

https://gist.github.com/fancellu/7815238