cpp: pass in WSAPI env table to Lua templates