use POSIX compatible command instead of which to determine if program exists