handle gDirectory special case for ROOT older than 5.32.00

This should fix #236