add NIX_LIB and NIX:LDFLAGS to fix linker problem
change nix::createProperty call to latest version