fixed #2247: Using functions instead of macros to speeding up building for JSB projects. [For not auto binding glue codes].