Allow custom allocator.
Tweak js_strtod.