Disable modal tests if SKIP_MODAL is set

This is needed if we are in environments where modal dialogues are broken

(#625)