Merged from node.js version.