Fix minimization dependency injection issues

This is to fix dependency injection when using different compressions algorithms such the one Ruby on Rails uses.

I'm using this fix on production with [Fliplingo](https://www.fliplingo.com).