Update for Cordova 3 compatibility.