fix JSON parser on some rare utf8 representations
This patch is provided by @hchaojie and should fix #252.