fix issue #23 (PHP-7.1 JSON compat)