Update globals.php

When I use the original function, it appears an error as follows:
unserialize(): Error at offset 0 of 3 bytes
\trunk\core\cms\globals.php(715): unserialize();
so I rewrote the function ,and it can work normally.