fix compiling error caused by disable CC_ENABLE_SCRIPT_BINDING
Merge pull request #9113 from Dhilan007/v3-scriptfix

fix compiling error caused by disable CC_ENABLE_SCRIPT_BINDING