Fix platform-specific os_str APIs