Self-similar solutions to the porous medium equation