Add support for building against Lua 5.2

I have not tested this against Lua 5.0 if support for that is still needed.