Update tree parser to new 4.0 binary naming scheme.

TODO: make work for 4.x versions.