attempt to make lua 5.2 work, thanks havokoc