better calling class detection; fixed token parsing issue in PHP 5.5.x