Fix renderAsTree on Windows