Polyfill for the <dialog> element