Fix emulator compilation for Mac OS X