Prevent extensions from clobbering all globals.

It's possible for a poorly written extension to destroy all global variables by returning nothing.  This prevents that and throws an E_WARNING to notify the developer.