Inject $q for AngularJS promises

My bad for forgetting to inject it in my last pull-request, I was testing the code within an AngularJS provider so I didn't realize `$q` of course wouldn't be defined in the global scope where this plugin would be run.

This should fix it by injecting `$q` if angular is defined.

----

Closes #19
/cc @vladipus @3melectronicmonitoring