Fix js strict-mode error: avoid prohibits function statements not at the top level of a script or function.
Merge pull request #458 from saneyuki/strict

Fix js strict-mode error.