Makes the build system to look for yajl using a macro file

Now searching for yajl using find_yajl.m4 macro file instead
of using pkg-config directly. If YAJL was not found or if it
was disabled in the configure phase, the code will be compiled
without JSON support.
Supports the yajl version 2

Initially the code was made to support the yajl version 1. The
version 2 is now the default option in most of Linux distributions,
so changing it to support the version 2.