fix Darwin compatibility