Fix undefined references in Lua build