Infinitary versions of the O'Nan-Scott theorem