Update emulator.c

byteswap.h not available on all platforms (e.g. FreeBSD). replaced by globals.h for platform independency.