Fix build w/o optional dependencies