Fix check for version 2 of Ruby.