Make self-contained library directory, choose platform at compile-time

This does most of the hard work loading the SDL libraries on the major platforms (x86 Windows, MacOSX, x86 Linux).