merge in some of the netbsd changes.