fix conditional compilation for mac