Fix issue #132, enhanced cross compatibility for bash conditions