Fix for prepare_lua_environment
Added socket functions to lua environment