jscript: Added to_flat_string helper and use it to access string buffer in activex.c.