NSWindows should only be created after you have an NSApplication