Fixes for JSON response, Mojo::JSON

Fix to allow this plugin to work when Mojolicious is returning a JSON response, as well as removing the depreciated call to Mojo::JSON->new().