support JSON::XS 2.X

JSON::XS 2.X exports the 'to_json' method.
It's also implemeted in Web::ChromeLogger.
This PR removes warnings.