Resolving cross-browser drawing incompatibility