shells/ksh: Fix build with LLVM15
(cherry picked from commit 40c294fd4f875a424d08c65bbb0dccb89a5e6e88)