Fixes deprecation warning for mimetype keyword argument