Fix compareSignatures

Fixes issue pointed out here: https://github.com/Microsoft/TypeScript/commit/e836fe17297a68ab6a3fb8de1980d07386d02935#commitcomment-9034915