Fix JSON job encoding… again.

A new, more workinger version of #137.

The original didn’t work because YAJL was overwriting the `JSON` module with its own version. The new test should let us know if some other configuration of JSON gems breaks our serialisation.