Firefox compatibility changes for canvas