terminal: added support for FreeBSD