Mostly complete lua 5.2 port