Fix a problem with Lua 5.1

Sadly this cannot be fixed with a fallback function, since the API changed between 5.1 and 5.2
Implement Lua 5.2 fallbacks using inline functions instead of ugly macros
Add Lua 5.2 fallback for luaL_requiref