Update for compatible code for AngularJS 1.2.rc-3 and above.