Improved extension globals support, fixing TSRMLS_CC