Various improvements to configure script

First commit checks for "-lm" because it is required to use the system csparse. This may also fix an issue reported on Arch. Second uses `pkgconf` to check for OpenGL and SDL_mixer, which is simpler and works correctly on FreeBSD out of the box. Finally, don't re-invent the wheel by using the default `pkgconf` failure messages.