Add Drupal 8 compatibility in global.inc