Add some missing headers to fix compilation on Mac OS X