fix darwin compilation