Retired pope writes book defending priestly celibacy