Add support for JSON::XS version 3

Fixes https://rt.cpan.org/Ticket/Display.html?id=89853