Add support for external jansson

Most linux distros come with jansson, most of them unfortunately with an outdated one.
This adds a versioned check for the system jansson, and uses it if it's new enough.