Tested and updated for Cordova 2.4.0