use PKG_CHECK_MODULES to detect json-c

since json-c creates a pkg-config, we can use it. Works with json-c version 0.10 and 0.11.