Fix for IIS

On IIS, the value of $_SERVER['HTTPS'] can be 'off' instead of empty.