Fix IE 8 bug with insertBefore.

If the second argument is undefined, IE 8 throws an "Invalid argument" exception. Instead, use appendChild.