Fix - check time_t prior to 1970.

Fixed test program so that it compiles. Fixed check for return value from test program and typo in cmake file.