Lua 5.2 and Visual C++

I fixed compilation (in a preprocessorish way) for Lua 5.2, and on Visual C++ (which lacks inline in C mode and snprintf).

Feel free to grab either changeset.