Fixed linked libraries to be the last argument of CC command.

Hi,

the Makefile did not work on my 14.04 ubuntu server, it failed to link the curses lib.
I remember from school that the correct order of arguments puts the libs as the
last argument, which really did the job.

Great work btw, I really like what you've done. (I hate scripting ..)