Handle dates correctly on Firefox.