Fixed compile error with CC_REF_LEAK_DETECTION
Merge pull request #9026 from cpascal/fix_error_scriptbinding_off

Fixed compile error with CC_ENABLE_SCRIPT_BINDING=0
Merge pull request #9017 from cpascal/fix_error_refleakdetection

Fixed compile error with CC_REF_LEAK_DETECTION