Allow json-encoding of non-utf-8 strings