Prevent loading of directory.css on every page

Hi
i am using an old drupal version
i noticed that directory.css is loaded on every single page of the site even though it’s only needed for the directory pages

inside the directory module i found those lines:

  if (!$may_cache) {
    // inject our css per http://api.drupal.org/api/HEAD/function/hook_init and http://api.drupal.org/api/HEAD/function/hook_menu
    drupal_set_html_head(theme('stylesheet_import', base_path() . drupal_get_path('module', 'directory') .'/directory.css'));
  }

How do i modify them to make directory.css load on the directory pages only?
am i looking at the right part of code?

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/22/feed