Handle offsetX/Y error in Firefox

Fixes Issue: #4