Moved variable decl to start of block for old gcc