also add license header to existing shims
Includes compatible replacements, or uses system err.h if available. ok beck@ guenther@