Support Lua 5.2

I think previews pull request you can just close.

Tested on 
OS - WinXP SP3 (no IPv6)

Lua 

 - 5.1.5 (builded with luavs.bat)
 - 5.2.2 (builded without any LUA_COMPAT_XXX macro)
 - luajit 2.0.1 (without Lua 5.2 compat)

CC

 - MinGW (gcc 4.6.2)
 - MSVC Express 10

Tests

 - hello.lua
 - testclnt.lua
 - stufftest.lua
 - excepttest.lua
 - test_bind.lua
 - test_getaddrinfo.lua
 - ltn12test.lua
 - mimetest.lua
 - urltest.lua
 - udp_send_recv.lua