Changed how global Lua functions are loaded.