Fix compilation on compilers without full C99/C++11 support, fix Lua stack for require("enet")

Changes originally made to lua-enet's code used in LÖVE.

https://bitbucket.org/rude/love/commits/fba8eb4af9c84510b0565df2d3813bc65d467354 and https://bitbucket.org/rude/love/commits/75a78aa8a6f3ac8f9cc3a04625a7492db579f835