Make gem install work under non-default ruby path

Fixes #254

Before this commit build.rb expects 'ruby' as the interpreter path.
It leads to gem installation failure in environments where ruby 1.8
is provided as a different path such as 'ruby1.8'.