Fixes issue when running in CocosDragon in CocosPlayer

Fixes issue when running in CocosDragon in CocosPlayer