Satisfy clang compiler warnings

The 64 bit clang compile emits warnings about loss of precision, since
size_t (the return type from strlen and other C functions) is an
unsigned long.
Port to Cocos2D v3

Updates for v3 of cocos2D