CCLOGINFO compilation fix

Hi,

When I change the `COCOS_DEBUG` preprocessor to 2 (to enabled `CCLOGINFO`, the library fails to compile in a few places. This PR fixes the issues.

P.S: Sorry about all the "merge branch" commits, if they are an issue, I can create another clean PR.

Thanks,