Update the makefile and make it work on FreeBSD.