Fixes building with stack within recent versions of ghc repo (#646)