Fixed demo1 compilation on Mac OS X