Cleaned up configure.ac so it finds libraries a little better.