use RbConfig variables to detect arch-dependent Ruby directories
make sure we build for the ruby binary that was used to run extconf.rb
Merge pull request #87 from doudou/master

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