Simplest method is a form that says 'are you sure you wish to logout' and they click a button, that posts to logout to complete the process.
Now, it's entirely possible for this to still be 'faked', however more difficult.
If you want to add another layer, you can add in a 'secret code' (although this could also be done instead of confirmation) that does something like this:
$logout_code = md5( 'logout_code'.$user_id );
which you send as the value of logout, ie:
<a href='logout.php?code=<?php echo $code?>'>logout</a>
and then recreate this code in the logout.php script to confirm logging them out.
This would give every user a unique code for logging out that the 'spoofer' couldn't duplicate.
And, now I'm awake, is a far better method than having a confirmation form on the logout page.