fix version detection while preserving backward compatiblity

Fixes the issue where it couldn't detect the version number due to changes in ghc-mod