Only enable flyspell if ispell-program-name exists
Tie flyspell-prog-mode to prog-mode in Emacs >= 24