Add angular 1.3 compatibility

See e38208e60c0415d75856e40aba98961283b084ec for more info