Fix build error/warnings on Linux, add NS to test script.