cbortojson: adapt to work with picolibc's variant of `funopen`

Instead of matching the API first introduced by 4.4BSD, picolibc decided
to be different.

```
tinycbor/src/open_memstream.c:103:29: error: passing argument 3 of 'funopen' from incompatible pointer type [-Wincompatible-pointer-types]
  103 |     return funopen(b, NULL, write_to_buffer, NULL, close_buffer);
      |                             ^~~~~~~~~~~~~~~
      |                             |
      |                             RetType (*)(void *, const char *, LenType) {aka int (*)(void *, const char *, int)}

In file included from tinycbor/src/open_memstream.c:31:
picolibc/include/stdio.h:429:28: note: expected '_ssize_t (*)(void *, const void *, size_t)' {aka 'int (*)(void *, const void *, unsigned int)'} but argument is of type 'RetType (*)(void *, const char *, LenType)' {aka 'int (*)(void *, const char *, int)'}
  429 |                 _ssize_t (*writefn)(void *cookie, const void *buf, size_t n),
      |
```

Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
2 files changed