properly check which-function-mode

closes #24