Dissipative phase transitions in optomechanical systems