Assign isExternal JS function to window object

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.
Merge pull request #599 from edx/db/fix-studio-login-next

Assign isExternal JS function to window object