Request animation frame polyfil with optional AngularJS utility