Fix build under Cygwin.

- add to_string method.