Moved INIT_GLOBALS to C entry point