Declare fill_pos outside the FOR

Hi Dean,
when work on a compiler not C99 you receive
"GCC error: 'for' loop initial declaration used outside C99 mode"

whit this modification it work with new and old compiler
Merge pull request #1 from testato/patch-1

Update the instrumentation code to work with non-C99 standards compliant compilers.