Add missing includes of time.h

This fixes building on MSVC.