Fix strict mode violation at core assets loader.

Strict mode restricts function declaration in a middle of code.
This not happend before because of code minification.