fix broken OSX build

This fails on OSX:

cc -Wa,--noexecstack -c -m32 -O  src/core/threadasm.S -oobj/32/threadasm.o
FATAL:/usr/bin/../libexec/as/i386/as: I don't understand '-' flag!
make[1]: *** [obj/32/threadasm.o] Error 1

This is a partial version of pull #364 which broke the OSX build.