Use clock_gettime() when available and get rid of deprecated gettimeofday()

Conflicts:
	extconf.rb