cachedb_mongodb: proper cflags and lib detection for json