Fixed bugs in Phar build.