Use $_SERVER[HTTPS] to determine if ssl
Update local_mediacore version