aligned with lua-5.2.2-rc4