Try using cordova.js instead of phonegap.js