Fix #2337069: Replace __DIR__ with dirname(__FILE__) for older PHP versions.