Fixing issue when running in Cordova:
- Adding cordova.js in index.html by default
- Better detection of runningInCordova