Fix a few warnings which show up with -Wundef

Also remove DARWIN, since OS X doesn't define that