Fix surface rendering on Firefox/Mac.