fixes TypeError: 'undefined' is not a function (evaluating 'cordovaRef.addConstructor')