Just a slightly modified patch that agrees on most bits.
Only big changes are that http.c puts the "no curl support" version at the top so that people that just open the file will realize straight away why the whole file is enclosed in a #ifndef instead of being required to scroll all the way to the bottom.
Second bit cleans up the command line parsing in couchjs (binary) by doing a couple extra steps in couchjs shell script. I'm not as enamored with this bit so if you think your way is better feel free to reject that part. Thought he http.c ifdef switch I would like to keep.