Bash: better OSX support