Fix corner grab for firefox

Amend 848baf7d1faa483d9909497af16dc461f2767b92 to fix the bug in Firefox 28. I'm not sure it's the best way to do that but it works well in Firefox, Chromium and Opera on Ubuntu.
simplification

easier to read fix
Merge pull request #1 from brunob/patch-1

Fix corner grab for firefox
Minify latest version.