Use autoconf to detect gettimeofday instead of broken #ifdef.