I was able to solve this by using the Builder::allowlist_item method with regex:
Builder::allowlist_item
Builder::default().allowlist_item(r"^mylib_.*$")