fix portability bugs in regression tests seen on Solaris-10
fix for a8e9ef