Fix interactive mode detection

@jrevans: Does fix the bulk of your issue in this comment?

https://github.com/matplotlib/matplotlib/commit/9fbd29fa9f41f0c3291ab14220d61ba4029eb405#commitcomment-4267815

I'm not sure I agree with your assertion that `is_interactive() === rcParams['interactive']`, but I do think we should keep `python -i script.py` working.