Clone of https://github.com/strophe/libstrophe