support JSON::XS 2.X
JSON::XS 2.X exports the 'to_json' method.
It's also implemeted in Web::ChromeLogger.
Merge pull request #1 from bayashi/remove_warnings_with_json_xs_2X

support JSON::XS 2.X