handle --main argument in Lua backend