PHP 7 compatibility patch from https://www.drupal.org/project/node_export/issues/2946171#comment-12518654