Cocoa.h and think we're in a Cocoa environment. ok espie@ (who also ran into this)
with feedback and tweaks by me. committing on behalf of laurent@