fix support for TSRM/ZTS