Fixed ruby version check for YAML

Somehow 0b22cd26 slipped by me with a broken test on ruby 1.8.7.  Now
the ruby version check is performed correctly so YAML 1.9 feature
discovery isn't attempted by mistake.