Removed the code incompatible with PHP 5.2.*

Namely, replaced __dir__ with dirname(__FILE__)