Update plugin to be compliant with Cordova 2.7+

It should fixed Issue #281.