Make using export independent of window existence