First principles investigations on the electronic structure of anchor groups on ZnO nanowires and surfaces