Add separate library for virtualenv handling in Flycheck
Use derived-mode-p when appropriate