Minified version throws exception in Angular 1.3.x