refactor(core): check `typeof Hammer` instead of window.Hammer

Closes #417