Fix the SwitchToModernTest

This changes SwitchToModernMode to only warn the user when the ImageJ
1.x UI is visible. Otherwise, the dialog box pops up when running the
unit tests...