Modify extconf.rb to support rubygems 2.2.0.preview.2.

Note:
Current implementation of extconf.rb is very dirty.
Please tell me how to build non-ruby external *.so library appropriately.
i.e. I would like to know how to build 7z.so, which is not a ruby c extension library but a normal shared library.