FreeBSD Support

This code should allow the program to be run on both Linux and FreeBSD with at least the simple case:

`reptyr ${pid}`

There is further work to be done on the FreeBSD side, notably tty-stealing and non-x86 support, but this is a start.