fix packaging to be sensitive to optional deps