Fix issue #227: Identify not working in Firefox.

Functions may not be declared within conditionals or other blocks.

For more details:
http://stackoverflow.com/questions/14242399/javascript-hoisting-in-chrome-and-firefox