modified to use AC_CHECK_FUNCS, not the predefined __sun__

In the first modification, I used "#if defined(__sun__)" to switch, however, it was not good.
In this revision, I put AC_CHECK_FUNCS(timegm) in the configure.ac and use "HAVE_TIMEGM" in conv.c.