fixes for kos-ports
Ticket #303 Some of these (like missing getpeername) are reasonable, but it seems like an odd platform that declares but doesn't implement access and umask, and implements but doesn't declare lstat. These changes need testing to see if enough works to be useful.