Modify FrameManager.getDefaultFrame so it's headless safe