Dalitz plot analysis of ηc→K+K−η and ηc→K+K−π0 in two-photon interactions