Dynamic phase transitions in a van der Waals gas