The two are identical in meaning; but the second is becoming rarer in British English, and is pretty well extinct in American English.
When have is an auxiliary (to form a perfect tense), all English speakers negate it like an auxiliary: "Have you seen it?" "I haven't seen it", not "*Did you have seen it?" "*I didn't have seen it" - the latter are not grammatical in any variety of English (which is what the stars mean).
But when have is a full verb (meaning 'possess', or 'own', or 'experience' etc), then usage varies. Americans almost always treat it like any other verb, and use do to form questions and negatives: "Do you have any milk?" "I don't have any milk". Increasingly people say these in Britain too, but many people (including me) prefer to use the older forms without do: "Have you any milk?" and "I haven't any milk". (In ordinary speech, most people stick 'got' in there: "Have you got any milk?" "I haven't got any milk".
"If we didn't have a space elevator..." is normal everywhere
"If we hadn't a space elevator..." is unusual in American English, and somewhat formal in British English.
"If we hadn't got a space elevator..." is normal in British English. [I believe it is not much used in American English, but I'm not sure].