apply the patch metioned in #518

add libjansson flags to Makefiles