Loosened check on canvas being an instance to HTMLCanvasElement

Don't create a new canvas even if the canvas does not appear to be an instanceof HTMLCanvasElement if the canvas is not owned by document.