shrc: some fixes for freebsd