Add NI_EXTERN/NI_INLINE and more robust unit testing check.
Version bump to 1.2.2.