Add dash compatibility for /bin/sh

Dash doesn't support `set -o pipefail`.