Fixed a bug with $injector.has() for older versions of angularjs