build: allow use of older versions of json-c

json-c library was first just named json. When requesting compilation
with json-c, also check for this library.