Make drawing work in firefox (and maybe some android browsers?)