Fixed an assertion that was deprecated in NUnit.

xbuild seems to ignore the »warnings as errors« setting, so it built correctly on Linux, but no on Windows.