Fix build on FreeBSD.

We use libinotify, so the linux folderwatcher works.

Based on a patch by:	Tobias Berner
And make it runnable on FreeBSD too.

Patch by:	Tobias Berner