Little fix for HTTPS detection

Use !empty() instead of isset() because if $_SERVER['HTTPS'] was just an empty string it still got detected as HTTPS.