Fix 10.9 python framework detection

Python Frameowrks in Mavericks are missing config.c.
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 should be backwards compatible.