Fix building in IDA mode on OS X

Thanks to aquadran.