fix tests on iOS where DOMElement.remove is not available