[build] don't compile natnet if not needed