Extending the PhoneGap API to use CommonJS-like promises (specifically, jQuery Deferreds).