Compile on OSX
Tidying compile on Darwin, eliminating nested ifeqs