Support both auto_ptr and unique_ptr depending on system

Ubuntu 12.04 ain't getting a g++ with x11 support, and who knows what
other build systems are still floating around. This is relatively new
and both setups should be allowed.

Also because Ubuntu also doesn't care about keeping things like
autoconf-archive up-to-date, I added the specific macro in-line instead
of try to depend on a very new dependency.