Add test for Kernel#instance_variable_defined?

Related #1748.