add missing include in ext_stream

We need to include sys/stat.h, or we might get errors such as:
error: aggregate 'stat s' has incomplete type and cannot be defined

Fixes the OSX build.