Fixed build error on Ruby 1.9

I fixed issue of https://github.com/eventmachine/eventmachine/issues/507 . Added to check thread.h in extconf.rb