Face detection works by detecting elements in the photo which are common to faces (eyes, mouth). Recognition works by comparing measurements of relationships of these elements across a database of known faces. (Usually, a matrix of measurements in reconstructed 3D space.)
You can defeat detection by either a) obscuring so much of the face that the computer can't tell it's there, or b) putting many confusing face-like elements in the photo so the computer can't tell what's real. (Fake eyes everywhere!) The second approach may still not be good enough, though, and is certainly not future-proof.
Recognition algorithms are very good. You can defeat them by not having the face detected in the first place, but after that, your best best would be to distort the face so that the measurements aren't accurate. You may be able to simply use makeup to "mask out" places where measurements are taken, so for example it's unclear where the edge of your mouth is exactly, or the distance between your eyes. But these are uncertain, and again, not future-proof.
Unfortunately, in order for this to succeed, the photo will have to be distorted enough that it can't look like the subject. As a general rule, any data processing task which can be done by a human can be done by a computer (see Watson, the trivia-game playing computer, for example). That means that if you can recognize the subject, a computer will be able to too — maybe not today, but certainly tomorrow. So, for the purposes of having a professional portrait, the answer is probably no, unless you don't mind wearing masks.
There is one possibility, though. That is: keep it analog. Have the picture taken with film, and don't scan it. Then, there's no chance of it being analyzed short of someone else digitizing it, and if they're doing that without your knowledge, you probably have other issues to worry about.
(Or, you could use digital files and keep them under tight control, but that's hard to do: people like to post to Facebook and other social networking sites, and if you do that, too late.)