handle the case where prog-mode-hook is not available