Update livereload.js

changed the document variable to the one in local scope.