ref #395, fix some imagemin build issues with caching