Updated code to support CiviCRM 4.4.