Fix buildepoch.sh for BSD.