fixed #1934: fix bug in CCApplication, fix compatibility in EGLView

fix bug in CCApplication, fix compatibility in EGLView