Keep media type when optimizing css

resolves #301 and resolves #302