Recognition of alternating groups of prime degree from their element orders