Hacky support for insertBefore