Add defininition of window.location.origin in both studio and LMS

The same bug in studio was fixed in #3893, and as TinyMCE is also used in LMS, it should be also fixed in LMS.