We already define _GNU_SOURCE in "config.h", depending on configure checks. Also, we always should first include "config.h" (which means to first include "nm-default.h"). Also, we don't need the entire <link.h>, <dlfcn.h> suffices.
We already have "shared/nm-utils/nm-jansson.h". Avoid reusing the same file name.