Fix some `is_xxx_available`
# What does this PR do?

FYI, after #23163,  `is_bs4_available()` and `is_faiss_available()` gives `False` even if they are actually available. This causes some CI errors, in particularly, `MarkupLM`.

This PR fixes the issue in a quick way. It's better to discuss if we want to enhance the function `_is_package_available` to be able to handle such edge cases.

(cc. @apbard FYI)
@ydshieh thanks for fixing this and sorry for having introduced these bugs in first place.<|||||>_The documentation is not available anymore as the PR was closed or merged._