Fix wrong comparison of types

If the two types were aliases (e.g. an import statement was involved), comparison with == would fail; replaced with =:=.

Fixes issue #165.