compatibility with cordova 3.0