Fixed missing import when running inside nosetest.