add ifdefs for mono