oslib: make str* compat functions more uniform