Trying to work around PHP 5.3.3 limitations...

is_a and is_subclass_of are limited before 5.3.9. This patch
uses reflection with PHP < 5.3.9.