How is endometriosis diagnosed?