Fix compilation errors for Lua 5.2 and below
Jam build: Update to support the jamplus3 branch