HTTPS check bugfix

Some web server returns a $_SERVER['HTTPS'] = 'no value' for non https connections
https://stackoverflow.com/questions/1175096/how-to-find-out-if-you-are-using-https-without-serverhttps