replace list.h with a BSD licensed variant (taken from FreeBSD SVN)