make: Fix memory stomp and apply patch from sourceforge

The memory stomp bug I submitted to bug-make@gnu.org :
http://lists.gnu.org/archive/html/bug-make/2014-01/msg00077.html

The sourceforge one is from :
http://lists.gnu.org/archive/html/bug-make/2014-01/msg00076.html