Changes to get it to build on FreeBSD

Just the minor changes needed to get it to (g)make and run on FreeBSD.