A Holographic Test of the Kibble-Zurek Mechanism