Implement DoubleToString that works with emscripten