Fixing 'for' loop initial declaration which are allowed only in C99