Make the Makefile more POSIX

Based on muennich/sxiv@b605b98455f2caf2e984764c8102641d868966cf.
Merge branch 'master' into latin1