Make the shell subroutines run on FreeBSD