fix AppSharedMemory.lua to work wit plain Lua+ffi library.

You can now debug programs with ZeroBrane Studio.