Fix path bug for PHP <=5.2