CMake: Add support for ensuring time_t is Y2038-safe

A CMake module that does this could be developed independently. If that works out well, upstreaming it could be considered.