Updated to work with Cordova 2.5