[ASan] Use check_library_exists to determine if libc/libstdc++ are available