Additional patch for Bug 821371 to fix crashes on windows, r=timeless

--HG--
extra : rebase_source : 0addf10c8284e141f1dfa8ae2fac467e5232c4f2