Add include guard to kdefs.h
Move __STDC_FORMAT_MACROS to SConstruct for PCH compatibility

__STDC_FORMAT_MACROS is needed to enable PRIi64.  __STDC_FORMAT_MACROS
must be set before including any headers, so when PCH is used, it must
be set on the command line.