conditional compilation for lua 502 -- wip