Replace deprecated CoLoadLibrary/CoFreeLibrary calls by new API calls.