Fix 10.9 ruby framework detection

On Mavericks the ruby headers have been moved into Xcode and it is using
ruby 2.0 so we need to properly set RUBY_VERSION at compile time and
point configure to the proper ruby binary.

This has been tested for backwards compatibility with 10.6 and 10.7.