fix compilation on darwin