I made an AI for it. I wanted to do it with minimax but python+my skills made it too slow. So I did in a different (ugly in some places) way. I don't know if it's unbeatable but I haven't beaten it while testing.
Requires python, pygame and sdl if you're not running Windows. Run game.exe if you do. It also needs MSVCR71.dll but I can't distribute it.
Tell me if it has any problems.
http://commodore.tservu.pri.ee/asjad/tictactoe.zip