Fix wrong comparison of types

If the two types were aliases (e.g. an import statement was involved),
comparison with == would fail; replaced with =:=.
Merge pull request #166 from danarmak/master

Fix wrong comparison of types