Remove generated files.
On Linux write is in unistd.h so include it.  At some point it'd be better to use autoconf to make this more platform neutral, for now this will do.
The boost thread library isn't prefixed with '-mt' anymore AFAI-can-tell