port of libmad to JavaScript using emscripten