Port to SDL2

Also add a -DSDL flag to allow #ifdef SDL sections.
SDL2 is found via pkg-config.

This may not build on first try with parallel make,
but works okay with -j1.