split out more compat code, add Linux special compat
compat functions for times