Use C89 for loop variable declarations

This fixes jsonlite to be able to compile on a old c compiler which does not support C99 for loop declaration(for example, the avr-gcc compiler of Arduino).