Fix test failures with Numpy < 1.7