Added Makefile for Emscripten. Fixed missing stdout declaration.
Fixed remaining compilation issues.