native: add stack smashing protection

Compare http://multimedia.cx/eggs/heroic-defender-of-the-stack/ for a discussion of the problem and the fix.

TLDR:
Valgrind does not find certain kinds of errors (array out of bounds write into otherwise valid memory) that this compiler flag adds code to check for.