Fixed Pad to support numpy version < 1.7.