Fix some FreeBSD issues

Tested and doesn't seem to break stuff. Hopefully the default route stuff will just work on FreeBSD now I've fixed configure.