Fix improper time includes, and fix accessing empty std::vectors.

On windows we can't access vectors of length zero, and doing so will throw
runtime errors in debug mode.

Change-Id: Id6bd25c0116a67a7222ec0ce019c4f232f777bac
Merge pull request #32 from robertmaynard/windows_support

Fix improper time includes, and fix accessing empty std::vectors.