porting: /bin/sh is standard, /bin/bash not
changed test for pthread, avoiding a libtool/gcc bug