Hack to work around Safari crash on setDragImage

Closes #1284