Change condition of YAML engine for Psych

rubygems is broken on defined Syck environment. I fixed this on ruby trunk. ref. https://github.com/ruby/ruby/commit/b0bc5635504faa851742ec056a9875fadf2fdcbc

@drbrain if you have more better code, Please fixed this and backport ruby trunk.

/cc @zzak @tenderlove

Thanks!