Handle the disappearance of the ndarray.setasflat method in numpy 1.7