Updating plugin to support Cordova 2.5

Updating plugin to support new API for Cordova 2.5