The electronic structures of polymeric beryllium hydride and polymeric boron hydride