Make OptimizeCommand backward compatible

Changed new implementation in OptimizeCommand to be backward compatible with old versions of the framework that do not specify providers or files in the compile config
You can use the config repository's [`get()` function](https://github.com/laravel/framework/blob/da8d1b525b5f3c89e8749afe36ec302deaeb4a78/src/Illuminate/Config/Repository.php#L90) here instead.