Abbas agrees to share power with Hamas