Add polyfill for mouseenter and mouseleave.

Fixes #931.