Add FreeBSD compatibility