enable compatibility with phonegap

This is in relation to the problem described in http://stackoverflow.com/questions/18178236/cordova-3-ripple, in particular when running phonegap 3.0.0 and ripple. Ripple issues the `cordova prepare` command which rebuilds the www files and removes `phonegap.js`. This fix simply recreates `phonegap.js` if the URI specifies `phonegap=true`.