Compatibility with phonegap 2.0 (Cordova)