Made JNI sources ANSI C compatible.

MS Visual C compilers (2010) do not support C99 so the JNI wrapper
functions must be ANSI C. This means variables must be declared at the
beginning of functions.