The electronic structure and band gap of LiFePO4 and LiMnPO4