Fallback to old 'unpack' if available.

This commit checks for the presence of table.unpack but falls back to 
the old unpack function. This lets resp work with Lua 5.1