fix immediately-executing function
Merge pull request #161 from greybird/master

fix IEF in javascript