bcopy, mblen (UTF-8), build fixes