fix Struct#inspect with recursion

Referring to jruby/jruby#2142 the details regarding differences between MRI and JRuby recursion guards are way beyond my understanding. If the code changes suck, I hope this PR at least explains what the problem is. :)