Creating C closures from Lua closures