Fix overlay and selection in mobile WebKit. Fixes #2