Added support for background/foreground callbacks in Cordova 2.3+ - Closing issue #14