Restore kind_of to match using kind_of? rather than ===

Fixes #744.