Compatibility for NumPy < 1.7