New parse_string cJSON code from upstream.
Fix for a regression in our cJSON variant.