Dynamical phase transitions after quenches in nonintegrable models