Improve Drupal 7.x compatibility