Port BSD tree.h header file