Add compabitility for angular 1.3

The way the link and controller function work was changed in angular 1.3
(last entry of this section
https://github.com/angular/angular.js/blob/master/CHANGELOG.md#since-1217-and-130-beta10).
Luckily this still lets us support angular 1.2 for as long as we have
to