fix all occurences of variables declared not at the beginning of a block
fix all occurences of variables declared not at the beginning of a block

This improves compatibility with pre-C99 compilers.

jansol/LuPng