Fix for drawImage issue found in Firefox.