I also observe the same behavior on a SLES10 machine with the same modules and versions.
On another SLES10 machine with older modules, I don't see this behavior, i.e., when I use as_string, the lines are terminated by \n, not \r\n. The versions on that machine are: