Fix throwing SPL exceptions in global namespace