export global in browser, detect EOF on compile