Use alterative pad function for numpy <= 1.6