Fix mixed content issues
Merge pull request #251 from mathiasbynens/fix-mixed-content

Fix mixed content issues. Closes #249