Fixes for modern RabbitMQ and JSON versions

Hi,
These commits make your module work with rabbitmq 3.0 and up, and with json::xs 3.0 and up.
Cheers,
Toby