BUG: fix NPY_NO_DEPRECATED_API mechanism.

Without this fix the build just crashes if you use the mechanism as documented. I tried to add documentation in the right places, please check if I missed any.