Update to work with latest phonegap