修复自动插入require的bug

采用indexOf来判断位置
Merge pull request #1 from fouber/patch-1

修复自动插入require的bug