add missing copy/assign declarations
add iso646.h for compatibility
work around some warnings with some casting
only call gettimeofday if available