Fixed problem for using shared library.
Fixed problem where generated mref classes for messages cannot be converted message_mref object.
Added json decoder.