Doctest fix for sphinx 1.2

I'm not sure it's the right fix, I have no clue how to test it, but it looks legit and it might still be helpful (fixes #214)