Fix bug in Element.insertBefore()

If there is no `refChild` passed to `insertBefore()`, the function returns `undefined` instead of the `newChild`.