Fixes a reference error when window isn't the global context.

This is the case in node (which we found running automated tests on views that require Pace). `window` isn't the global context so setting `window.Pace` doesn't make `Pace` referencable.