Fixed infinity loop, added makefile.FreeBSD