Fixes for building against upstream MD.