add ifdefs to make system.c compile on non-linux systems