fix for using livereload.js over https (taken from github user kingcody's PR)