fix compilation on Darwin