JS Debugger : Sync with changes in cocos2d-x master and add a workaround.

 * Requires commit https://github.com/folecr/cocos2d-x/commit/c2d7a6eb35b8958ce51dceb6e217c8d8b280980a  (https://github.com/cocos2d/cocos2d-x/pull/2868) in cocos2d-x