Cross-browser polyfill for `Range#extractContents()`