Enhance platform support, including OS X, Windows and JRuby.

The following extconf.rb parameters are used to locate kakasi:
  --with-kakasi-dir
  --with-kakasi-lib
  --with-opt-dir
  --with-opt-lib

The value of LIBRUBY_SO is used to detect the file name format for
dynamic libraries on the platform.