Well, regarding Lua 5.2 compatibility, I'm blocked by LuaSec. I could not found any version for 5.2. LuaSocket is almost there, and LuaCrypto... I found there is a pull request waiting to be merged, adding support for it.
If you are referring to my fork [1], the code from my master branch actually already supports Lua 5.2 (well, I managed to build it in Lua 5.2 and run the following simple test):