Fixed compatibility with Cordova 4.0