Compatibility with phonegap 2.0 (js and java) (Cordova) and previuos versions (in JS file)

Now the plugin works with cordova 2.0