various build fixes and regression fixes in wthttpd