Minor adjustments for emscripten support in libxml2, memory allocation shouldnt allow for random assignments, moved back to malloc