Fix mailcore build