fix ZTS build (reported by Denis Savenko)