Ab initio study of nonadiabatic interactions in the photodissociation of ketene