Backward compatibility with PHP < 5.3. Changed __DIR__ to dirname(__FILE__)