Fix logic in conditionals checking USE_GIT, NOPORTS, and NODOC