compatible with cordova 3.x