For some reason, when using some extensions, firefox just bugs out the context after running a toDataURL. We now create a separate canvas for mask drawing.