Mod rpaf support (with FreeBSD support)

This is #460 plus FreeBSD (experimental). Not tested on FreeBSD.