Make use of luaL_len() in select()