Feature #4977: Fix compilation issues for lua-tests