sgs2c update, updated API, fixed sgsjson export fn