Added AngularJS 1.3.1 compatibility