is_ssl() is more reliable than $_SERVER['https']

Fixes #5
Merge pull request #9 from om4james/ssl

Better SSL/HTTPS detection. Props to @emilbjorklund for reporting the initial problem.