Use rbconfig to find the ruby interpreter.
Merge branch 'rbconfig-ruby' into osx-build
Define the correct struct stat for osx on osx.