Fix ROOT-5446

This solve the issue of unloading libCore when TROOT are never
really been used and thus is not completely initialized.