Make C-code work with numpy < 1.7.0