as mentioned in the first comment in https://github.com/cocos2d/cocos2d-html5/issues/1011, I had to move those classes earlier in the load order so that a conditional compile flag defined in CCConfig would exist before CCMacro was processed.  Overall, I think that CCConfig should be the first file loaded, however it is dependent on CCGeometry and Sys.js.