Move declarations to the top of the function, for pre-C99 compilers.