Add window, document and undefined to plugin initialization