use importlib.machinery instead of the (deprecated) imp