common, bridge: Support older JSON versions like 0.14.2

This is compatible on RHEL6 and other OS's. We just needed
a few minor changes to make this work.

We expect json-glib 0.14.0 or later, but I accidentally used
functions only available in later versions.