Fix plugin when installed via cordova command line

I tried installing this plugin using the `cordova plugin add ...` (cordova version 3.5) and found that `window.CanOpen` was not a function that could be called. This pull request addresses this.