one definition of json_object_object_foreach only works on c99 and later

On GCC, I had an error in my code which tries to use `json_object_object_foreach`:

```
 error: 'for' loop initial declarations are only allowed in C99 mode
 note: use option -std=c99 or -std=gnu99 to compile your code
```

I don't specify an standard during compilation, so it uses `-std=gnu89` (and I get the same error when I specify it explicitly). Enforcing `-std=c89` (or via `-ansi`) doesn't work either (for a bunch of reasons, like single-line `//` comments all over the place).

Everything works if I specify C99, but it seems like fixing the `json_object_object_foreach` definition would be best.