Old gcc compilers don't like declarations in the middle of a function.