fixed #2247: Using functions instead of macros to speeding up building for JSB project.
Merge pull request #2725 from dumganhar/iss2247-refactor-jsb-proxy-develop

fixed #2247: Using functions instead of macros to speeding up building for JSB project.