Do all old books give you headaches, or just some? It may be that some have mold/mildew issues that are affecting you.....would it also be possible to get the info on the book and borrow it or inter-library-loan it at your library rather than buying it? A book kept in a library may be better maintained and not have as much odor.
If you're set on buying it, you can try sun - open the book outside in the sun, and turn a few pages now and then. If it is damp or going to rain, (or if you live in a really humid part of the country) this is not a great idea.
One library I worked at used Lysol spray for the stink of some books that came back from a shut-in's house reeking. But honestly, if the book is truly that stinky, the smell may be permanent. Those books they treated never got rid of all the smell....
I guess I'm just wondering what sets you off - is it old glue breaking down? That would be pretty hopeless to
help.....mold/mildew or dust from poorly kept books?