Change pixel size hack to only try in Firefox.

In Google Chrome, the canvas.width and canvas.height override the CSS style.