Wrap the lua_Integer to int conversion.