Add version checking for is_subclass_of function.

version under 5.3.9 does not support 3 parameters.