Fix ufunc support under Numpy 1.6