replace calls to writeJavascript (deprecated in Cordova 4.0.0)
Merge branch 'cordova_40_compliance'