I was thinking of ways to incorporate the openresty-specific language extensions such as thread.exdata and the various table.* functions and it seems to me that the best way would be to put it under a conditional build flag (-DOPENRESTY_EXTENSIONS or similar). This would be set by default in luajit2 and disabled by default in my fork.
Does that sound like a reasonable approach? If yes then I'll first post patches to put the bits under conditional macros and then incorporate these features into my fork.