Adding workaround for newer versions of boost when using the transitive_closure function