Fix Darwin(OS X) platform support