Prevent exception in PanelManager

Issue #4164. Not sure why PanelManager code is executing for Jasmine Spec Runner window, but this fixes the exception.