Fixed API for Cordova 3.0