Code for exiting app doesnt' work with Cordova 3.0.0 version