For use with stratum PROXY server

Fixes buggy json parsing so that it works with a stratum PROXY server.
NB its still getwork, so won't connect directly to stratum, hence need
to use a proxy which can be run on localhost. Required because getwork
will soon be unsupported by mining pools.