Fix call to is_a to be compatible with php <= 5.3.9

Fixes #142