fix compilation for older numpy versions