dir.c: glob cases on case-insensitive system

* dir.c (glob_helper): return the filename with actual cases on
  the filesystem if it is case-insensitive.  [ruby-core:42469]
  [Feature #5994]

git-svn-id: svn+ssh://svn.ruby-lang.org/ruby/trunk@44807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e