fix($animate): use direct DOM comparison when checking for $rootElement

Closes #4679