fix compile error for lua template
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_fix
Merge pull request #6802 from samuele3hu/v3_fix

[ci skip]fix compile error for lua template