Miscellaneous cleanup for compile errors.
Timeval struct bitness issue [#2059]
[#2017] Add MOD_NOREPEAT for Windows 7.