use instanceof to check for IntlException

instanceof even works for PHP < 5.5 where IntlException does not exist,
so use it instead of get_class().