Merge pull request #1 from nickmain/emscripten

Merge emscripten into master
Added optimization options to makefile
Merge pull request #2 from nickmain/master

Merge emscripten optimization