Add Makefile.emcc and build with emscripten. Add C methods for mallocing structs. Add wrapper JS. Add test sample.