unit-test-client: fix compilation on compilers not supporting c99 mode

This fixes the message
"error: 'for' loop initial declarations are only allowed in C99 mode",
spotted during cross-compiling of libmodbus.

The compiler (gcc) actually does support -std=c99 but it gets not
enabled by default. So a solution would be to enforce c99 mode
via CFLAGS, but this will knock out all compilers which do not
support this mode.
Moving the declaration out of the loop initialisation, seems to be
the simpler solution.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>