Surface electronic structure of Be(0001) and Mg(0001)