Build fixes related to autodetection of Ruby and Ruby-related build flags

This uses new RbConfig variables that allow to properly know where things are instead of having to rely on conventions as on 1.9. It fixes building the gem on the ruby 2.0 prebuilt binary package on Debian and Ubuntu.

The second commit makes sure that we build for the ruby that has been used to run extconf.rb, making installation in multi-ruby environments more robust IMO.