nmsg/base/encode.c: Add XML printing via libxml2.

Adds libxml2 >= 2.8 dependency.