py2.6, npy1.5 fixes