Also resolves implicit definition warnings for wait by including the necessary header where applicable