Implement SysAllocStringLen (to replace usages of SysAllocString, in order to handle BSTR's that are not null-terminated).