Improve signing script, adjust flags for gcc-4.2

On one of my machines codesign doesn't find my signing key by hash, but
does find it by name. Go figure.
Also on that same system (32bit Mac Mini with running Snow Leopard / 10.6)
gcc 4.2 doesn't support the -unused-result warning. So let's only turn
that on for more modern versions of gcc

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>