Assign isExternal JS function to window object

https://edx-wiki.atlassian.net/browse/STUD-591

When JS functions are defined with names, they are local variables, and inaccessible
if defined inside a closure. Django-Pipeline concatenates all of our JS into one
big closure. This function explicitly assings the function to a property of the
`window` object, so that it is accessible to other JS functions.