Unfortunately I never got emscripten to work on my machine. Could you give it a try and compile http://pngquant.org/lib?