Use table.unpack instead of unpack and add small compatibility shim