Corrected SmartOS build failure.

Moved cJSON to its own library to avoid multiple
symbol definition issues.

Change-Id: I104038f1788599b4fc448356485f5fcaac6df52a