fork of https://bitbucket.org/zserge/jsmn