Compatibility with phonegap 2.0 (Cordova)

The change made gets the plugin working with phonegap 2.0