Electronic structure and optical properties of magnesium tetraborate: An ab initio study