Fixed compatibility with Boat Browser

Fixes #1760