Modify gemspec and extconf.rb for easy building

There is a problem `ruby extconf.rb && make` fail.
Fix it by move compiling file checks from gemspec to extconf.rb.
In extconf.rb, using not 'host_os' but have_header() method.