Kibble-Zurek Mechanism in Driven Dissipative Systems Crossing a Nonequilibrium Phase Transition.