Use COCOS_EXTERNAL_DIR in Find*.cmake modules
Compile Box2D tests only if library used in cocos.
Add custom FindJPEG.cmake module.