zfile: Port to BSD