Fix windows compilation - location of variable declaration.

Move variable declaration so that it compiles on Windows.