Fix memory leak in Utility::GlobRecursive.

Fixes #5604