lua-repl.c does not compile with lua 5.2

On my Archlinux system, which has lua 5.2, I cannot compile OCL; it has undeclared variables in lua-repl.c.

I think this question and answer on Stack Overflow relates to it:

I do not have enough understanding of lua to solve this; please help.

Regards, Theo