Compile fix for older GCCs from Nikolai V. Ivanyushin <nvi@sven.ru> (Move declaration of variable to start of function)