Don't generate default global function when not needed