In the downstream projects (ROOT and Cling), we want to do header files
lookups but no OpenFile behavior as we only need to register the file
name.
This patch extends the original API call by adding some optional flags
so we can continue use it in the previous way with no breakage.
Signed-off-by: Jun Zhang <jun@junz.org>