fix building on darwin