lua: add lua 5.2 compatibility changes