Switch to importlib module for conditional imports