Add sys/{types,stat}.h include to make sure stat() works at all times.