Added FreeBSD specific macros and includes for kernel build.
scons: Add HAVE_SYS_STAT_H define on FreeBSD platform.

On FreeBSD defines like S_IWUSR are only in sys/stat.h and not in fcntl.h
where Linux holds them also, thus required HAVE_SYS_STAT_H define for
successfull compilation.