Added FreeBSD spcific telldir() change.