Fix some bash incompatibilities