json: proper cflags and lib detection for json
json: fix typo in previous commit