Fix deprecation warnings for c_str_to_static_slice