Fix segfault in module_shutdown under PHP5.3