tree: fix compilation on darwin