More BSD support in shell scripts. Though release_sync.sh still relies on bash.