Add missing includes of time.h

This fixes building on MSVC.
Merge pull request #531 from mstorsjo/add-missing-includes

Add missing includes of time.h