Add Makefile for compilation outside Windows.

With this change, psxwadgen now compiles and runs on Linux (but has not
yet been fully tested). Some minor changes are also included for
portability.
Merge pull request #2 from fragglet/master

Add Makefile for compilation outside Windows.