Make plugin cordova 3.4+ ready