move "use strict" statement into closure

use strict should only be defined in functions