N-compactness and weighted composition maps