Parties may not give jurisdiction to a court by consent, express or implied, as to the person or subject matter of an action. However, lack of jurisdiction of the person may be waived, insofar as the rights of the parties are concerned, but not so as to prejudice third persons.