A \ before the beginning of a function represents the Global Namespace in PHP. Putting it there will ensure that the function called is from the global namespace, even if there is a function by the same name in the current namespace.
Summary of Changes
I added a backslash in front of defined('_JEXEC') or die; for the namespaced files if it was not already there. Up to know I covert the folders administrator, components, modules, plugins, layout and template.
merging on review thanks @astridx