window.plugins is not defined anymore, replaced it with cordova.plugins

Reproduced in 3.1, see #60