Provide a fallback luaL_setfuncs() for Lua 5.1

The LGI bindings are failing at runtime because of the above missing
function. Added it to compat.c: implementation borrowed from Lua wiki.