Fixed a linking issue with GNU ld.

GNU ld won't link foo-wm as-is, since the libraries are in the front.
I separated compiler options (like -g and -Wall) from libraries (-lX11 and
-lm) to prevent ld from failing.