Xen4.2 ABI compat

In quick testing this works for me, but there is no checking and surely is not enterprise quality yet and is also leaking memory, which I guess can be fine in case of xl cli.
The first commit is unrelated, fixing memory leaks reported by valgrind.

As tomorrow I won't be at work, hence I'm creating this pull request for your review.