add ifdefs to fix conditional compilation