The behaviour you are seeing is what happens when you have high-impedance inputs. Basically, if you don't drive them, you get random values.
Unfortunately in your case, where the sensor you are using has no output current to speak of, I don't think there's anything you can do about this electronically.
You'll have to solve the problem in some other way if you really need to be able to disconnect the sensor. A mechanical solution would be a connector which shorts when disconnected. Switched headphone connectors do this, for example - when you pull out the jack, they make a connection so that the speakers can be switched on.