Despite his conservative credentials , Thompson has had trouble narrowing the gap behind former New York Mayor Rudy Giuliani in national polls and lags in the early primary voting states of Iowa and New Hampshire , while holding his own in South Carolina .