Fixed ZTS build
Correctly set $_SERVER['HTTPS'] on TLS connection