Compatibility with phonegap 2.0 (Cordova)

Now the plugin works with Phonegap 2.0+