fix "undefined reference" error on certain platform
use similar option ordering in cc invocation