Make the program write_connect more portable.
Merge branch '1.8'.