Use autoconf for most compiler options

Hopefully this means we'll break on fewer platforms.
OpenBSD: Automatically look for libgmp in /usr/local