fixed lua issues, the library is compiled as C++ but with C name mangling (well, lack thereof) so that Lua modules will work correctly