Merge pull request #1317 from benvanik/patch-1

Fixing compilation error when building with emscripten.